package fr.cie.blog.domainservice;

import java.util.List;

import fr.cie.blog.beans.User;
import fr.cie.blog.modeldao.hib.UserDaoImplHib;

/**
 * @author AetM
 * 
 */
public class ServiceUserDao implements IServiceUser {
	/**
	 * serviceUserImpl.
	 */
	private final IServiceUser serviceUserImpl = new UserDaoImplHib();

	/*
	 * (non-Javadoc)
	 * 
	 * @see fr.cie.blog.domainservice.IServiceGeneric#save(java.lang.Object)
	 */
	@Override
	public final int save(final User user) {
		return serviceUserImpl.save(user);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see fr.cie.blog.domainservice.IServiceGeneric#delete(java.lang.Object)
	 */
	@Override
	public final int delete(final User user) {
		return serviceUserImpl.delete(user);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see fr.cie.blog.domainservice.IServiceGeneric#findAll()
	 */
	@Override
	public final List<User> findAll() {
		return serviceUserImpl.findAll();
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see fr.cie.blog.domainservice.IServiceGeneric#findById(int)
	 */
	@Override
	public final User findById(final long pIdentifier) {
		return serviceUserImpl.findById(pIdentifier);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see fr.cie.blog.domainservice.IServiceUser#findByLogin(int)
	 */
	@Override
	public final User findByLogin(final String pLogin) {
		return serviceUserImpl.findByLogin(pLogin);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * fr.cie.blog.domainservice.IServiceUser#checkPassword(java.lang.String)
	 */
	@Override
	public final User authenticateUser(final String login,
			final String password) {
		return serviceUserImpl.authenticateUser(login, password);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see fr.cie.blog.domainservice.IServiceGeneric#update(java.lang.Object)
	 */
	@Override
	public final int update(final User user) {
		return serviceUserImpl.update(user);
	}

}